﻿<Window x:Class="Client.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" x:Name="MainForm">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="75"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="120"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="50"></RowDefinition>
            </Grid.RowDefinitions>
        
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Grid Grid.Column="0">
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                
                    <TextBox Grid.Row="0" Name="ServerIP">localhost</TextBox>
                    <TextBox Grid.Row="1" Name="Nickname">Noname</TextBox>
                
                    <StackPanel Grid.Row="2" Orientation="Horizontal">
                        <Ellipse Name="ConnectIndicator" Width="25" Height="25" Fill="Red" Margin="5"></Ellipse>
                        <Ellipse Name="JoinIndicator" Width="25" Height="25" Fill="Red" Margin="5"></Ellipse>
                    </StackPanel>
                </Grid>
                
                <Button Grid.Column="1" Margin="3" Click="ButtonClick">Connect</Button>
                <Button Grid.Column="2" Margin="3" Click="ButtonClick1">Join</Button>
            </Grid>
        
            <ListBox Grid.Row="1" Name="Messages" ItemsSource="{Binding MessageList, UpdateSourceTrigger=PropertyChanged}"></ListBox>
        
            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="75"></ColumnDefinition>
                </Grid.ColumnDefinitions>
            
                <TextBox Name="SendingMessage"></TextBox>            
                <Button Grid.Column="1" Margin="3" Click="ButtonClick2">Send</Button>
            </Grid>
        </Grid> 
        
        <ListBox Name="Users" Grid.Column="1" 
                 ItemsSource="{Binding UsersList, UpdateSourceTrigger=PropertyChanged}"
                 ></ListBox>
    </Grid>
</Window>
